Initialize screen of GtkStyleContext to default screen
authorCarlos Garcia Campos <cgarcia@igalia.com>
Fri, 26 Nov 2010 07:59:10 +0000 (08:59 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:48 +0000 (15:39 +0100)
gtk/gtkstylecontext.c

index 292ab12fa7b13a2f1c5e449246e1321a7da5f717..2cee5004bc2eb4f3db6f7bdf02bad36f1ac3fa1d 100644 (file)
@@ -706,6 +706,8 @@ gtk_style_context_init (GtkStyleContext *style_context)
 
   priv->direction = GTK_TEXT_DIR_RTL;
 
+  priv->screen = gdk_screen_get_default ();
+
   /* Create default info store */
   info = style_info_new ();
   priv->info_stack = g_slist_prepend (priv->info_stack, info);
@@ -1232,9 +1234,8 @@ style_provider_remove (GList            **list,
  * gtk_style_context_new:
  *
  * Creates a standalone #GtkStyleContext, this style context
- * won't be attached to any widget nor screen, so you may want
- * to call gtk_style_context_set_path() and
- * gtk_style_context_set_screen() yourself.
+ * won't be attached to any widget, so you may want
+ * to call gtk_style_context_set_path() yourself.
  *
  * <note>
  * This function is only useful when using the theming layer